package com.zhonghui.modlules.user.eshopMapper;


import com.zhonghui.common.eshopMapper.CoreMapper;
import com.zhonghui.modlules.user.eshopDomain.UserLevel;
import com.zhonghui.modlules.user.eshopDto.UserLevelInfoDto;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserLevelMapper extends CoreMapper<UserLevel> {
@Select({"SELECT l.id,a.add_time as addTime,l.discount,a.level_id as levelId,l.name,l.icon,l.grade FROM user_level a INNER JOIN system_user_level l ON l.id=a.level_id WHERE a.status = 1 AND a.is_del = 0 AND a.id = #{id} LIMIT 1"})
UserLevelInfoDto getUserLevelInfo(int id);
}